package cn.edu.sgu.www.pms.dto;

import cn.edu.sgu.www.pms.consts.CustomMessages;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class RoleDTO implements Serializable {
    private static final long serialVersionUID = 18L;

    @ApiModelProperty(value = "角色ID")
    private Integer id;

    /**
     * 角色名称
     */
    @NotBlank(message = "角色名称" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "角色名称", required = true)
    private String name;

    /**
     * 排序
     */
    @NotNull(message = "排序" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "排序", required = true)
    private Integer sort;

    /**
     * 应用ID
     */
    @NotNull(message = "应用" + CustomMessages.ID_NOT_NULL)
    @ApiModelProperty(value = "应用ID", required = true)
    private Integer serviceId;

    /**
     * 角色描述
     */
    @NotBlank(message = "角色描述" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "角色描述", required = true)
    private String description;
}